/*
 * @Author: fishroom
 * @Date: 2022-10-14 10:14:27
 * @LastEditTime: 2022-10-14 10:22:20
 * @FilePath: \koa\app\util\paginate.ts
 */
function paginate(data: any, currentPage: number, totalCount: number, limit: number) {
  return {
    data,
    currentPage,
    totalCount,
    totalPage: Math.ceil(totalCount / limit),
    limit,
  };
}
export default paginate;
